library(ggplot2)
head(diamonds)

set.seed(1410)
dsmall <- diamonds[sample(nrow(diamonds), 100), ]

qplot(color, price/carat, data=diamonds, geom="jitter", alpha=I(1/20))

qplot(color, price/carat, data=diamonds, geom="boxplot")

qplot(carat, data=diamonds, geom="histogram", binwidth=1, xlim=c(0,3))


qplot(carat, data=diamonds, geom="histogram", fill=color)


qplot(color, data=diamonds, geom="bar", weight=carat)+scale_y_continuous("carat")

